import React from 'react';

import {Button, Nav, NavItem} from 'react-bootstrap';
import {LinkContainer} from 'react-router-bootstrap';

import styles from './Selector.less';

export default class Selector extends React.Component {
  state = {

  }

  key = 1;

  genLink(toHref, text){
    return <LinkContainer to = {toHref} key = {this.key++}>
      <NavItem className = {styles.link}>{text}</NavItem>
    </LinkContainer>
  }

  render(){
    return <div> 
      <Nav bsStyle="pills" className = {styles.container}>
        {this.props.links.map(v=>this.genLink(v.toHref, v.text))}
      </Nav>
    </div>
  }
}
